﻿using System.Web.Mvc;

namespace mscook.mvc.Areas.weblogin
{
    public class webloginAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "weblogin";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
        
            context.MapRoute(
            name: "GetTemplate",
            url: "weblogin/magazine/{action}/{year}/{month}/{alias}/{index}",
            defaults: new { year = UrlParameter.Optional,controller="magazine",action = "Index", month = UrlParameter.Optional, alias = UrlParameter.Optional,index=UrlParameter.Optional },
            namespaces: new[] { "mscook.mvc.Areas.weblogin.Controllers" }
        );

            context.MapRoute(
                "weblogin_default",
                "weblogin/{controller}/{action}/{nowPageNum}",
                new { action = "Index", nowPageNum = UrlParameter.Optional }
            );
          
          
        }
    }
}
